package com.jxd.ordering.exception;

/**
 * @ClassName OrderingException
 * @Description TODO
 * @Author Ankailong
 * @Date 2022/9/29
 * @Version 1.0
 */
public class GlobalException extends Exception {
    /**
     * 错误码
     * -1：输出错误信息
     * -2：用户未登录
     * -3：用户无访问权限
     * -4：密码错误
     */
    private String errorCode;
    private String errorMsg;//错误信息

    public GlobalException() {
        super();
    }

    public GlobalException(String message) {
        super(message);
        errorMsg = message;
    }

    public GlobalException(String errorCode, String errorMsg) {
        super(errorCode);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    @Override
    public Throwable fillInStackTrace() {
        return this;
    }
}
